package com.ihelp.service.impl;

import com.ihelp.mapper.HospitalMapper;
import com.ihelp.pojo.HospitalDepartment;
import com.ihelp.mapper.HospitalDepartmentMapper;
import com.ihelp.service.HospitalDepartmentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author LiuZiMing
 * @since 2023-05-23
 */
@Service
public class HospitalDepartmentServiceImpl extends ServiceImpl<HospitalDepartmentMapper, HospitalDepartment> implements HospitalDepartmentService {

    @Autowired
    private HospitalDepartmentMapper hospitalDepartmentMapper;
    @Override
    public List<HospitalDepartment> getAllHospitalDepartment() {
        return hospitalDepartmentMapper.selectList(null);
    }

    @Override
    public HospitalDepartment getHospitalDepartment(Integer id) {
        return hospitalDepartmentMapper.selectById(id);
    }
}
